Mixed Lazy/Strict Graph Semantics

نویسندگان

  • Marko van Eekelen
  • Maarten de Mol
چکیده

Explicitly enforcing strictness is often used by functional programmers as an important tool for making applications fit time and space efficiency requirements. Few functional programmers however, are familiar with the consequences of explicitly enforcing strictness for formal reasoning about their programs. Some “folklore” knowledge has emerged but this is based on experience rather than on rigid proof. Up to now no formal model has been available for reasoning about enforcing strictness in denotational and operational semantics. This greatly hampered formal reasoning on mixed lazy/strict programs. This paper presents a model for formal reasoning with enforced strictness based on John Launchbury’s lazy graph semantics. Lazy graph semantics are widely considered to be essential for lazy functional programming languages. In this paper Launchbury’s semantics are extended with an explicit strict let construct. Correctness and adequacy of our mixed lazy/strict graph semantics is proven. Using these mixed semantics we formalise and prove some of the available “folklore” knowledge.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Proving Lazy Folklore with Mixed Lazy/strict Semantics

Abstract. Explicit enforcement of strictness is used by functional programmers for many different purposes. Few functional programmers, however, are aware that explicitly enforcing strictness has serious consequences for (formal) reasoning about their programs. Some vague “folklore” knowledge has emerged concerning the correspondence between lazy and strict evaluation but this is based on exper...

متن کامل

A Chemical Abstract Machine for Graph Reduction

Graph reduction is an implementation technique for the lazy λ-calculus. It has been used to implement many non-strict functional languages, such as lazy ML, Gofer and Miranda. Parallel graph reduction allows for concurrent evaluation. In this paper, we present parallel graph reduction as a Chemical Abstract Machine, and show that the resulting testing semantics is adequate wrt testing equivalen...

متن کامل

Reasoning about explicit strictness in a lazy language using mixed lazy/strict semantics

Abstract. Many functional programmers are familiar with the concept of enforcing strictness for making applications fit their time and space efficiency requirements. Few functional programmers however, are familiar with the consequences of enforcing strictness for formal reasoning about their programs. This paper attempts to fill the gap between the few and the many. Some typical examples are g...

متن کامل

Fine Control of Demand in Haskell

Functional languages have the -calculus at their core, but then depart from this rm foundation by including features that alter their default evaluation order. The resulting mixed evaluation|partly lazy and partly strict|complicates the formal semantics of these languages. The functional language Haskell is such a language, with features such as pattern-matching, case expressions with guards, e...

متن کامل

The logic of demand in Haskell

Haskell is a functional programming language whose evaluation is lazy by default. However, Haskell also provides pattern matching facilities which add a modicum of eagerness to its otherwise lazy default evaluation. This mixed or “non-strict” semantics can be quite difficult to reason with. This paper introduces a programming logic, P-logic, which neatly formalizes the mixed evaluation in Haske...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004